import java.util.Scanner;

public class searchbook implements doOperation{
    @Override
    public void work(booklist bl) {
        System.out.println("请输入你要查找的书籍");
        String name;
        Scanner p=new Scanner(System.in);
        name=p.nextLine();
        for(int i=0;i<bl.getUsedsize();i++){
            book a=bl.getbook(i);
            if(a.getName().equals(name)){
                System.out.println(a);
                return;
            }
        }
        System.out.println("没有找到该书籍");
    }
}
